package Try;

import java.util.Scanner;
import java.util.concurrent.locks.ReentrantLock;

public class Main8 {
    static int count;

    public static void main(String[] args) {
        int[] result = readInput();
        int pre = 0;
        int r = 0;
        for (int i=0;i<count;i++){
            if (result[i]==1&&result[i]!=pre){
                r++;
            }
            pre = result[i];
        }
        System.out.println(r);
    }



    public static int[] readInput(){
        Scanner scanner = new Scanner(System.in);
        count = scanner.nextInt();
        scanner.nextLine();
        String a = scanner.nextLine();
        String b = scanner.nextLine();

        int[] nums1 = new int[count];
        int[] nums2 = new int[count];
        for (int i=0;i<count;i++){
            nums1[i] = Integer.valueOf(a.charAt(i));
            nums2[i] = Integer.valueOf(b.charAt(i));
        }

        int[] result = new int[count];
        for (int i=0;i<count;i++){
            if (nums1[i]==nums2[i])
                result[i] = 0;
            else
                result[i] = 1;
        }
        return result;
    }
}
